
//
//  LYSelectCityCell.m
//  SelectCity
//
//  Created by liuyan on 2019/3/12.
//  Copyright © 2019年 liuyan. All rights reserved.
//

#import "LYSelectCityCell.h"

@interface LYSelectCityCell()

@property (nonatomic, strong) UILabel *titleLabel;

@end

@implementation LYSelectCityCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self initSubViews];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return self;
}

#pragma mark - InitSubViews
- (void)initSubViews{
    self.titleLabel = [[UILabel alloc] init];
    self.titleLabel.font = Font(Font_13);
    self.titleLabel.textColor = THEMECOLOR_OF_TEXT_333333;
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:self.titleLabel];
}

#pragma mark -- Action
- (void)setData:(NSDictionary *)dataDic isCityStateSecond:(BOOL)isSecond isSelect:(BOOL)isSelect {
    self.titleLabel.text = dataDic[@"name"];
    
    if (isSelect) {
        self.titleLabel.textColor = THEMECOLOR_OF_ORANGE;
    } else {
         self.titleLabel.textColor = THEMECOLOR_OF_TEXT_333333;
    }
    
    if (isSecond) {
        self.titleLabel.frame = CGRectMake(0, 0, WIDTH/2, 45);
    } else {
        self.titleLabel.frame = CGRectMake(0, 0, WIDTH/3, 45);
    }
}


@end
